import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsBoolean, IsNotEmpty } from 'class-validator';

export class LikeArticleDto {
  @ApiProperty({
    example: '',
    description: '用户id',
  })
  @IsNotEmpty({ message: '用户id不能为空' })
  @IsString()
  userId: string;

  @ApiProperty({
    example: '',
    description: '是否点赞。true:点赞，false:取消点赞',
  })
  @IsBoolean({ message: 'like必须为布尔值,true:点赞，false:取消点赞' })
  @IsNotEmpty({ message: 'like不能为空' })
  like: boolean;
}
